package bean;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class myFirstServlet extends HttpServlet {

	public myFirstServlet() {
		
	}

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
			resp.setContentType("text/html");
			req.setCharacterEncoding("utf-8");
			resp.setCharacterEncoding("utf-8");
			
			String mid = req.getParameter("mid");
			
			PrintWriter out = resp.getWriter();
			out.print("<font color=red size=7>" +mid +"</font>");
			out.close();
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
	
		super.doPost(req, resp);
	}

}
